package com.project.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.InsectPestBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 虫害
 */
public interface InsectPestDao extends BaseMapper<InsectPestBean> {

    /**
     * 分页显示
     * @return
     */
    IPage<InsectPestBean> findAllInsectPest();

    /**
     * 添加
     * @param insectPest
     */
    void addInsectPest(InsectPestBean insectPest);


    /**
     * id查询详细信息
     * @param insectPestId
     * @return
     */
    InsectPestBean findId(@Param("insectPestId") int insectPestId);


    /**
     * 虫名寄主模糊查询虫害信息
     * @param insectPestName
     * @param insectPestHost
     * @return
     */
    List<InsectPestBean> findName(@Param("insectPestName")String insectPestName,
                                  @Param("insectPestHost")String insectPestHost);
}
